<%--
  Created by IntelliJ IDEA.
  User: ZT171
  Date: 2024/9/27
  Time: 20:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css" >
    <style>

    </style>
</head>
<body>
    <p>
        <a class="layui-btn layui-bg-blue" href="/student/toadd">新增学生</a>
    </p>
    <table class="layui-table" lay-even>
        <colgroup>
            <col width="150">
            <col width="150">
            <col>
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>编号</th>
            <th>学号</th>
            <th>姓名</th>
            <th>出生日期</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${students}" var="s">
            <tr>
                <td>${s.sId}</td>
                <td>${s.studentNum}</td>
                <td>${s.studentName}</td>
                <td><fmt:formatDate value="${s.birthday}"></fmt:formatDate></td>
                <td>
                    <a href="/student/toupdate/${u.id}">编辑</a>
                    <a href="/student/delete/${u.id}">删除</a>
                </td>
            </tr>
        </c:forEach>
        <tr>
            <td colspan="4">
                <a href="/student/list/1">首页</a>
                <c:if test="${page.currentPage != 1}">
                    <a href="/student/list/${page.currentPage-1}">上一页</a>
                </c:if>
                &nbsp;第${page.currentPage}页/总${page.totalPage}页&nbsp;
                <c:if test="${page.currentPage != page.totalPage}">
                    <a href="/student/list/${page.currentPage+1}">下一页</a>
                </c:if>
                <a href="/student/list/${page.totalPage}">末页</a>
            </td>
        </tr>
        </tbody>
    </table>


</body>
</html>
